public class code9_21 {
    public static int fibonacci(int n){
        if(n==1||n==2){
            return 1;
        }else {
            return fibonacci(n-1) + fibonacci(n-2);
        }
    }
    public static void main(String[] args) {
        System.out.println(fibonacci(10));
    }

    public static void recursion(int n){
        if(n<10 && n>0){
            System.out.print(n+" ");
        }else {
            recursion(n/10);
            System.out.print(n%10+" ");
        }
    }
    public static void main8(String[] args) {
        recursion(1234);

    }
    public static void main7(String[] args) {
        String str = "hello java";
        String str1 = new String("hello java");
        char[] arr = {'h','e','l','l','0',' ','j','a','v','a'};
        System.out.println(str);
        System.out.println(str1);
        System.out.println(arr);
    }

    public static void main5(String[] args) {
        char ch = 'a';
        int data6 = ch;
        System.out.println(data6);
        //最后会输出97整数
    }
    public static void main4(String[] args) {
        char ch = 'a';
        boolean bool = true;
        System.out.println(ch);
        System.out.println(bool);
    }
    public static void main3(String[] args) {
        float data4 = 4.4f;
        double data5 = 5.5;
        System.out.println(data4);
        System.out.println(data5);
    }
    public static void main2(String[] args) {
        byte data = 0;
        short data1 = 1;
        int data2 = 2;
        long data3 = 3;
        System.out.println(data);
        System.out.println(data1);
        System.out.println(data2);
        System.out.println(data3);
    }


    public static void printString(){
        System.out.println("hello man");
    }
    public static void main1(String[] args) {
        int studentAge = 18;
        char ch = 'a';
        printString();
        System.out.println("hello JAVA");
    }

}
